package xl.net
{
	import flash.net.Responder;

	public class AmfModel
	{
		public var serverClass:String;
		public var method:String;
		public var param:Object;
		
		private var _responder:Responder;
		private var _okCall:Function;
		private var _faultCall:Function;
		
		public function AmfModel($serverClass:String,$method:String,$okCall:Function,$param:Object=null,$faultCall:Function=null):void
		{
			serverClass = $serverClass;
			method = $method;
			param = $param;
			setResponse($okCall,$faultCall);
		}
		
		public function setResponse($okCall:Function,$faultCall:Function):void
		{
			_okCall = $okCall;
			_faultCall = $faultCall;
			_responder = new Responder(_okCall,_faultCall);
		}
		
		
		public function get faultCall():Function
		{
			return _faultCall;
		}
		
		public function get okCall():Function
		{
			return _okCall;
		}

		public function get responder():Responder
		{
			return _responder;
		}

	}
}